// run: $exec < input
#include <iostream>

int main()
{
	std::ios::sync_with_stdio(false);
	int h = 0;
	int now = 0;
	int n;
	std::cin >> n;
	for (int i = 1; ; i++) {
		now += i;
		if (n < now) break;
		n -= now; h++;
	}
	std::cout << h << "\n";
}

